import React, { Component } from "react";
import MainLayout from "@/component/mainLayout/mainLayout";
import Button from "@/component/button";
import iconCoffee from "@images/ic_coffee02.png";
import "./index.scss";

class jumpMiddlePage extends Component {
	constructor(props) {
		super(props);
		this.state = {};
	}

	goxhdHome() {
		//用来判断 小辉贷首页 的 右上角标签、挽留页 返回支付结果页
		sessionStorage.setItem("fromPage", "payResult");
		this.props.history.replace("/xhdHome");
	}

	render() {
		let _pageParams = {
			header: {
				title: "跳转页",
				titleColor: "#232323",
				headerBackground: "#fff"
			},
			history: this.props.history,
			cacheLifecycles: this.props.cacheLifecycles
		};

		return (
			<MainLayout pageParams={_pageParams}>
				<div className="jump-middle-page">
					<div className="content-wrap">
						<div className="process-ani">
							<img className="time-img" src={iconCoffee} alt="" />
						</div>
						<p className="text">您正在跳转</p>
						<p className="text">至小辉贷产品页面...</p>
					</div>
					<div className="footer-wrap">
						<Button
							buttonStyle={{
								height: "0.98rem",
								lineHeight: "0.98rem"
							}}
							onClick={this.goxhdHome.bind(this)}
						>
							确认
						</Button>
					</div>
				</div>
			</MainLayout>
		);
	}
}

export default jumpMiddlePage;
